package io.renren.modules.member_group.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.member_group.dao.V9MemberGroupDao;
import io.renren.modules.member_group.entity.V9MemberGroupEntity;
import io.renren.modules.member_group.service.V9MemberGroupService;
import org.springframework.stereotype.Service;

import java.util.Map;


@Service("v9MemberGroupService")
public class V9MemberGroupServiceImpl extends ServiceImpl<V9MemberGroupDao, V9MemberGroupEntity> implements V9MemberGroupService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<V9MemberGroupEntity> page = this.page(
                new Query<V9MemberGroupEntity>().getPage(params,"groupid",true),
                new QueryWrapper<V9MemberGroupEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public void updateListorder(Map<String, Object> params) {
        Integer groupid=Integer.parseInt((String)params.get("groupid"));
        Integer sort=Integer.parseInt((String)params.get("sort"));
        V9MemberGroupEntity shipping=new V9MemberGroupEntity();
        shipping.setGroupid(groupid);
    }

}
